# -*- coding: utf-8 -*-
# @Time : 2021/7/25 12:39
# @Author : zy7y
# @Gitee : https://gitee.com/zy7y
# @File : HomePage.py
# @Project : SeleniumPOM
from selenium.webdriver.common.by import By

from Pages.BasePage import BasePage


class HomePage(BasePage):

    # LOGOUT_LINK = (By.LINK_TEXT, "注销")
    LOGOUT_LINK = (By.CSS_SELECTOR, "#user-tools > a:nth-child(4)")

    def __init__(self, driver):
        super(HomePage, self).__init__(driver)

    def get_home_page_title(self):
        return self.get_title()

    def is_logout_link_exist(self):
        return self.is_enabled(self.LOGOUT_LINK)